<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!-- 过滤器 -->
<h1>{{ title | upper }}</h1>
<h1>{{ title | lower }}</h1>
<h1>{{ title | capfirst }}</h1>
<form action="/calc" method="post">
  <input type="text" name="num1" value="{{ num1 }}">
  <select name="op">
    <option value="+" {% if op == '+' %}selected{% endif %}>加</option>
    <option value="-" {% if op == '-' %}selected{% endif %}>减</option>
    <option value="*" {% if op == '*' %}selected{% endif %}>乘</option>
    <option value="/" {% if op == '/' %}selected{% endif %}>除</option>
  </select>
  <input type="text" name="num2" value="{{ num2 }}">
  <span>=</span>
  <span>{{ result }}</span>
  <br>
  <input type="submit" value="计算">
</form>

</body>
</html>